//
//  ActivityDetailModel.m
//  Shengzhuli
//
//  Created by FXGuo on 2017/7/21.
//  Copyright © 2017年 kamangkeji. All rights reserved.
//

#import "ActivityDetailModel.h"
#import "CustomerModel.h"

@implementation ActivityDetailModel

- (instancetype)initWithDict:(NSDictionary *)dict
{
    if (self = [super init]) {
        self.activityPictureUrl = dict[@"activityPictureUrl"];
        self.title = dict[@"title"];
        self.clubName = dict[@"clubName"];
        self.content = dict[@"content"];
        self.address = dict[@"address"];
        self.flow = dict[@"flow"];
        self.webActivityUrl = dict[@"webActivityUrl"];
        self.holdDate = dict[@"holdDate"];
        self.ID = [dict[@"id"] integerValue];
        self.clubId = [dict[@"clubId"] integerValue];
        for (NSDictionary *gDict in dict[@"guestList"]) {
            CustomerModel *model = [[CustomerModel alloc]init];
            model.title = gDict[@"title"];
            model.avatarUrl = gDict[@"avatarUrl"];
            [self.guestList addObject:model];
        }
    }
    self.keepStatus = [dict[@"keepStatus"] integerValue];
    self.clubLogo = dict[@"clubLogo"];
    self.backgroundImg = dict[@"backgroundImg"];
    self.mobilePhone = dict[@"mobilePhone"];
    self.clubContent = dict[@"clubContent"];
    self.activityType = [dict[@"activityType"] integerValue];
    return self;
}

+ (instancetype)objectWithDict:(NSDictionary *)dict
{
    return [[ActivityDetailModel alloc]initWithDict:dict];
}

- (NSMutableArray *)guestList
{
    if (!_guestList) {
        _guestList = [NSMutableArray array];
    }
    return _guestList;
}

@end
